package com.aispeech.task.lasr;

import com.aispeech.task.fsm.EventType;
import com.aispeech.task.fsm.State;
import com.aispeech.task.fsm.Transition;

public class LASRState extends State {
    public static final State Finish = new LASRState("Finish", new Transition(EventType.Terminal, Terminal));

    public static final State Label = new LASRState("Label", new Transition(EventType.Terminal, Terminal));

    public static final State Fuse = new LASRState("Fuse", new Transition(LASREventType.Fused, Finish),
            new Transition(LASREventType.FusedAndNeedLabel, Label));

    public static final State Asr = new LASRState("Asr", new Transition(LASREventType.Asred, Fuse));

    public static final State AudioCut = new LASRState("AudioCut", new Transition(LASREventType.AudioCutted, Asr));

    public static final State SplitChannel = new LASRState("SplitChannel", new Transition(LASREventType.ChannelSplitted, AudioCut));

    public static final State Download = new LASRState("Download", new Transition(LASREventType.Downloaded, AudioCut),
            new Transition(LASREventType.DownloadedAndNeedSplit, SplitChannel));

    public static final State Initial = new LASRState("Initial", new Transition(LASREventType.Initialized, Download));

    protected LASRState(String name, Transition... transitions) {
        super(name, transitions);
    }
}
